<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    
    <style>
        .active{
            border: 10px solid red;
        }
    </style>
</head>
<body>
    <div id="app">
        <img v-bind:src="imgsrc" alt=""  :title="imgtitle+'****'">
        <!-- <img :src="imgsrc" alt="" :class="isactive?'active':''" @click="toggactive"> -->
    <img :src="imgsrc" alt="" :class="{active:isactive}" @click="toggactive">


    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

    <script>
        var app=new Vue({
            el:"#app",
            data:{
                message:"hhhh",
                imgsrc:"https://i1.hdslb.com/bfs/archive/9c6ec48406589d49b656f7593877082770852e37.jpg@672w_378h_1c_!web-home-common-cover.avif",
                imgtitle:"黑马",
                isactive:false
            },
            methods: {
                toggactive:function(){
                    this.isactive=!this.isactive
                }
            }
        })
    </script>
    
</body>
</html>